package com.tcl.aota.manage;

import com.tcl.aota.persistent.model.AppCuref;
import com.tcl.aota.persistent.model.Curef;
import com.tcl.aota.vo.Product;

import java.util.List;

/**
 * @author kelong
 * @date 5/7/15
 */
public interface CurefManage {
    /**
     * get product list by product
     *
     * @param product
     * @return
     */
    List<Product> selectProduct(String product);

    /**
     * get curef list by product
     *
     * @return
     * @throws Exception
     */
    List<Curef> selectCurefByProducts(List<String> products);

    /**
     * get curf by appId
     *
     * @param appId
     * @return
     */
    List<AppCuref> selectCurefByAppId(Long appId);

    /**
     * get product and curef by appId
     *
     * @param appId
     * @return
     */
    List<Curef> selectCurefByApp(Long appId);

    /**
     * 更新curef表数据
     *
     * @return
     */
    int updateCuref(List<Curef> curefList,List<String> createUsers) throws Exception;

    /**
     * 获取所有的CU
     *
     * @return
     * @throws Exception
     */
    List<Curef> selectAllCuref(int flag);

    /**
     * 根据创建人区分更新正式CU和测试CU
     *
     * @param list
     * @return
     */
    int updateFlagByCreateUser(List<String> list);
}
